import {createApp} from 'vue'
//import './style.css'
import App from './App.vue'

const app = createApp(App);

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 注册所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
import zhCn from 'element-plus/es/locale/lang/zh-cn'
app.use(ElementPlus, { locale: zhCn })

import router from '@/router';

app.use(router);

import myMixin from '@/utils/mixin';

app.mixin(myMixin);

// pinia
import {createPinia} from 'pinia';

const pinia = createPinia()
app.use(pinia)

// store
import useStore from "@/store";
app.config.globalProperties.$store = useStore();

// 配置全局api
import api from '@/api'
app.config.globalProperties.$api = api;
app.mount('#app')

